package main

import "fmt"

// 打印传递给它的任何类型的数据。下面是这段代码的详细解释：
func mPrint(datas ...interface{}) {
	for _, value := range datas {
		fmt.Println(value)
	}
}

type myError struct{}

func (m *myError) Error() string {
	//TODO implement me
	return "我自定义的error"
}

func (m myError) Timeout() bool {
	//TODO implement me
	panic("implement me")
}

func (m myError) Temporary() bool {
	//TODO implement me
	panic("implement me")
}

func main() {
	var data = []interface{}{
		"lxy", 42, 1.66,
	}
	mPrint(data...)

	var data2 = []interface{}{
		"lxy", "lyc", "zx",
	}
	mPrint(data2...)

	var err error
	err = &myError{}
	fmt.Println(err.Error())

}
